package com.intelligentmeterreadingsys.httpserver;

import com.intelligentmeterreadingsys.util.SharedPreferenceUtil;

import dbhelper.XmlNameHelper;

import android.content.Context;

/**
 * 向服务器请求参数
 * @author king
 *
 */
public class RequestUrl {
	
   public static final String GOTOWORK="/afa!add.action";//上下班请求
   
   public static final String BandingWater="/water!query.action";//水表绑定上传请求
   //atla!query.action
   public static final String DownloadWaterList="/atla!query.action";//下载表册请求
  
   public static final String UploadOrder="/upload!add.action";//上传工程单请求
   ///cop!add.action
   public static final String COPYWATERLIST="/cop!add.action";//抄表上传请求
     
   public static final String TimingLocation="/location!add.action";//定时定位请求
   
   public static final String REVIEWUPLOAD="";//复查数据上传
   //
   public static final String REVIEWDOWNLOAD="/atla!queryFucha.action";//复查数据下载
   
   public static final String EQUIPEMENTADD="";//其它设备添加
   
   public static final String EQUIPEMENTMODIFY="";//其它设备修改
   
   public static final String EQUIPEMENTDOWNLOAD="/otherDownload!dowloadOther.action";//其它设备下载
   
   public static final String HECKEQUIPEMENT="";//巡检其它设备
   
   
   
   private SharedPreferenceUtil sp;
   
   public RequestUrl(Context context){
	   sp=new SharedPreferenceUtil(context);
   }
   
   public String getUrl(String reques){
	  
	   StringBuffer sb=new StringBuffer("http://");
	   sb.append(sp.getValue(XmlNameHelper.IP)).append(":").append(sp.getValue(XmlNameHelper.port));
	   sb.append("/").append("WaterService").append(reques);
	 
	return sb.toString();
	   
   }
}
